//
//  NavViewController.m
//  练习
//
//  Created by hcios on 2017/7/5.
//  Copyright © 2017年 hcios. All rights reserved.
//

#import "NavViewController.h"

@interface NavViewController ()

@end

@implementation NavViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    //1.修改navigationbar背景颜色
    self.navigationBar.barTintColor = [UIColor colorWithRed:30.0 / 255.0f green:144 / 255.0f blue:255 / 255.0f alpha:1.0];
    [self.navigationBar setTintColor:[UIColor whiteColor]];
    NSDictionary *navbarTitleTextAttributes = @{NSForegroundColorAttributeName:[UIColor whiteColor]};
    [[UINavigationBar appearance] setTitleTextAttributes:navbarTitleTextAttributes];
    
    //2.去掉导航栏下面的阴影线
    [self.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];
    [self.navigationBar setShadowImage:[UIImage new]];
    
    //3.关闭半透明效果
    self.navigationBar.translucent = NO;
    
}



@end
